package cn.jervain.nut.auth.starter.properties;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.http.HttpMethod;

import java.util.ArrayList;
import java.util.List;

@Data
@ConfigurationProperties(prefix = "nut.auth")
public class AuthProperty {

    private List<String> permits = new ArrayList<>();
    private String tokenKey = "Authorization";
    private String tokenPrefix = "Bearer ";
    private Class tokenDetailClz = Object.class;

    private String usernameParam = "username";
    private String passwordParam = "password";

    private String authEndpoint = "/login";
    private HttpMethod authMethod = HttpMethod.POST;

    private Boolean demo = false;

    private MemoryProperty memory = new MemoryProperty();

}
